package com.xinghen.common.base.model.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xinghen.common.base.GlobalConstant;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author xinghen
 * @ClassName: BaseVo
 * @Package: com.xinghen.common.base.model.vo
 * @Description 展示层对象基类
 * @create 2018-04-11 15:37
 */
@Data
@ApiModel
public class BaseVo implements Serializable {

    private static final long serialVersionUID = -1695850022460957581L;

    private Long id;

    /**
     * 创建人ID
     */
    private Long creatorId;

    /**
     * 创建人
     */
    private String creator;

    /**
     * 最后操作人ID
     */
    private Long lastOperatorId;

    /**
     * 最后操作人
     */
    private String lastOperator;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = GlobalConstant.Time.COMMON_FORMAT_PATTERN, timezone = GlobalConstant.Time.DEFAULT_TIME_ZONE)
    @DateTimeFormat(pattern = GlobalConstant.Time.COMMON_FORMAT_PATTERN)
    private Date createTime;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = GlobalConstant.Time.COMMON_FORMAT_PATTERN, timezone = GlobalConstant.Time.DEFAULT_TIME_ZONE)
    @DateTimeFormat(pattern = GlobalConstant.Time.COMMON_FORMAT_PATTERN)
    private Date updateTime;

}
